package com.orhon.smartcampus.modules.user.mm;


import com.orhon.smartcampus.modules.base.mm.LangMapper;
import com.orhon.smartcampus.modules.teacher.entity.TInformation;
import com.orhon.smartcampus.modules.user.gqlModel.GQLAddressBook;
import org.mapstruct.InheritConfiguration;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper(
        uses = {
                LangMapper.class,
        }
)
public interface AddressBookMapper {

    AddressBookMapper MAPPER = Mappers.getMapper(AddressBookMapper.class);


    @Mappings({
            @Mapping(source = "id" , target = "id"),
            @Mapping(source = "telnumber" , target = "telphone"),
    })
    GQLAddressBook getAddressFromTeacher(TInformation entity);


    @InheritConfiguration(name = "getAddressFromTeacher")
    List<GQLAddressBook> getAddressFromTeachers(List<TInformation> teachers);



}
